﻿@model ApplicationUserViewModel

<hr />
<div class="form-horizontal">
    <div class="form-group">
        <label asp-for="Name" class="col-md-2 control-label"></label>
        <div class="col-md-4">
            <span class="form-control">@Model.Name</span>
        </div>
    </div>
    <div class="form-group">
        <label asp-for="UserName" class="col-md-2 control-label"></label>
        <div class="col-md-4">
            <span class="form-control">@Model.UserName</span>
        </div>
    </div>

    <div class="form-group">
        <label asp-for="PhoneNumber" class="col-md-2 control-label"></label>
        <div class="col-md-4">
            <span class="form-control">@Model.PhoneNumber</span>
        </div>
    </div>
    @*<div class="form-group">
        <label asp-for="Email" class="col-md-2 control-label"></label>
        <div class="col-md-4">
            <span class="form-control">@Model.Email</span>
        </div>
    </div>*@

    @{
        var roles = "";
        foreach (var item in Model.RoleNames)
        {
            roles += item + " ";
        }
    }
    <div class="form-group">
        <label asp-for="RoleNames" class="col-md-2 control-label"></label>
        <div class="col-md-4">
            <span class="form-control">@roles</span>
        </div>
    </div>
    <div class="form-group">
        <label asp-for="DepartmentName" class="col-md-2 control-label"></label>
        <div class="col-md-4">
            <span class="form-control">@Model.DepartmentName</span>
        </div>
    </div>

    <div class="form-group">
        <label asp-for="CreateTime" class="col-md-2 control-label"></label>
        <div class="col-md-4">
            <span class="form-control">@Model.CreateTime</span>
        </div>
    </div>

    <div class="form-group">
        <label asp-for="LastLoginTime" class="col-md-2 control-label"></label>
        <div class="col-md-4">
            <span class="form-control">@Model.LastLoginTime</span>
        </div>
    </div>

    <div class="form-group">
        <div class="col-md-offset-2 col-md-10">
            <span>
                <a asp-action="edit" asp-route-id="@Model.Id" class="btn btn-default col-md-2">编辑</a>
            </span>
            <div style="display:inline-block;float:right;">
                <a href="/admin/user/updatepassword/@Model.Id" class="btn btn-default" style="width:100px;background-color:red;color:white;" >修改密码</a>
            </div>
        </div>
    </div>
</div>
@section Scripts {
    @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
}
